import java.util.Random;
import java.util.Scanner;

public class Job01 {
    public static void main(String[] args) {
        int[] grades[] = new int[5][3];
        Random random = new Random();
        int[] Totals = new int[grades.length];
        int[] Avgs = new int[grades.length];
        int[] Maxs = new int[grades.length];
        int[] Mins = new int[grades.length];
        for (int i = 0; i < grades.length; i++) {
            for (int j = 0; j < grades[i].length; j++) {
                grades[i][j] = random.nextInt(101);
                Totals[i] += grades[i][j];
                if (Maxs[i] < grades[i][j]){
                    Maxs[i] = grades[i][j];
                }
                if (Mins[i] > grades[i][j]){
                    Mins[i] = grades[i][j];
                }
            }
            Avgs[i] = Totals[i]/grades.length;
        }

        for (int i = 0; i < grades.length; i++) {
            System.out.println("\n第" +(i+1)+ "名学生成绩");
            System.out.println("*********************************");
            for (int j = 0; j < grades[i].length; j++) {
                System.out.print("成绩:");
                System.out.print(grades[i][j]+ "分\t");
            }
            System.out.println("\n*********************************");
            System.out.println("总成绩:" +Totals[i]+ "分");
            System.out.println("平均分:" +Avgs[i]+ "分");
            System.out.println("最高分:" +Maxs[i]+ "分");
            System.out.println("最低分:" +Mins[i]+ "分");
            System.out.println("*********************************");
        }
    }
}
